package com.woniuxy.direct.service.impl;

import com.woniuxy.direct.service.DirectService;
import com.woniuxy.po.TopicMail;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author: 马宇航
 * @Description: TODO
 * @DateTime: 22/12/29/0029 16:25
 * @Component: 成都蜗牛学苑
 **/
@Service
public class DirectServiceImpl implements DirectService {
    @Autowired
    RabbitTemplate rabbitTemplate;
    @Override
    public void send(TopicMail topicMail) {
        rabbitTemplate.convertAndSend("directEx",topicMail.getRoutingkey(),topicMail);
    }
}
